<template>
	<view class="ayi-page">
		<navigation :isBack="true" :title="name" titleTintColor="#fff">
			<text slot="back" class="iconfont">&#xe63d;</text>
			<text slot="nav_topbar_title_img" class="iconfont" style="font-weight: 100;">&#xecaa;</text>
			<text slot="string">10000.00</text>
			<text slot="iconfont" class="iconfont" style="font-size: 20px;">&#xe6ea;</text>
		</navigation>
		<view class="lotter-last">
			<view class="lotter-last-left">
				<view class="lotter-last-l-date">第20191114-03期</view>
				<view class="lotter-last-l-num">
					<text class="l-num">20</text>
					<text class="l-num">7</text>
					<text class="l-num">4</text>
					<text class="l-num">14</text>
					<text class="l-num">18</text>
					<text class="l-num">19</text>
				</view>
				<view class="lotter-last-l-sum">
					<text class="l-sum">92</text>
					<text class="l-sum">大</text>
					<text class="l-sum">双</text>
					<text class="l-sum">尾小</text>
					<text class="l-sum">龙</text>
					<text class="l-sum">虎</text>
				</view>
			</view>
			<view class="lotter-last-right">
				<text>
					第
					<text class="red">405</text>
					期
				</text>
				<text>截止</text>
				<text class="time">14:50</text>
			</view>
		</view>
		<view class="lotter-20"></view>
		<view class="lotter-tab">
			<view class="lotter-tab-one">
				<text class="iconfont" style="font-size: 48rpx;">&#xe62e;</text>
				<text>投注区</text>
			</view>
			<view class="lotter-tab-one"></view>
			<view class="lotter-tab-voice"><text class="iconfont" style="font-size: 48rpx;">&#xe662;</text></view>
		</view>
		<view class="lotter-content" :style="[{ height: lotterCLeftHeight }]">
			<view class="lotter-c-left">
				<!-- 	<view class="lotter-c-l-item active"><text class="l-item-text">快捷</text></view> -->
				<view v-for="(item, index) in lotsMenu" :key="index" class="lotter-c-l-item"
					@click="showLotData(item, index)" :class="{'active':index==lotsMenuSelectIndex}">
					<text class="l-item-text active">{{ item.title }}</text>
				</view>
			</view>
			<view class="lotter-c-right">
				<view class="lotter-tablebar-rate"
					v-if="(code == 'lhc' && playCode == 'lhc_slx') || (code == 'qlc' && playCode == 'qlc_slx')">
					<view class="lotter-tablebar-rate-name">自选不中</view>
					<view class="lotter-tablebar-rate-num">赔率:{{ specialRateVal }}</view>
				</view>
				<view class="lotter-tablebar-rate"
					v-if="(code == 'f3d' && playCode == 'f3d_zs3') || (code == 'pl3' && playCode == 'pl3_zs3')">
					<view class="lotter-tablebar-rate-name">组选三</view>
					<view class="lotter-tablebar-rate-num">赔率:{{ specialRateVal }}</view>
				</view>
				<view class="lotter-tablebar-rate"
					v-if="(code == 'f3d' && playCode == 'f3d_zs6') || (code == 'pl3' && playCode == 'pl3_zs6')">
					<view class="lotter-tablebar-rate-name">组选六</view>
					<view class="lotter-tablebar-rate-num">赔率:{{ specialRateVal }}</view>
				</view>
				<view class="lotter-tablebar-rate" v-if="code == 's3s' && playCode == 's3s_zs3'">
					<view class="lotter-tablebar-rate-name">红码组合</view>
					<view class="lotter-tablebar-rate-num">赔率:{{ specialRateVal }}</view>
				</view>
				<view class="lotter-tablebar-rate" v-if="code == 's3s' && playCode == 's3s_zs6'">
					<view class="lotter-tablebar-rate-name">黑码组合</view>
					<view class="lotter-tablebar-rate-num">赔率:{{ specialRateVal }}</view>
				</view>
				<view class="lotter-tablebar-rate" v-if="(code=='lhc' &&  playCode=='lhc_sxd') || (code=='qlc' && playCode=='qlc_sxd')">
					<view class="lotter-tablebar-rate-name">合肖</view>
					<view class="lotter-tablebar-rate-num">赔率:{{ specialRateVal }}</view>
				</view>
				<view class="lotter-tablebar"
					v-if="(code == 'pks' && playCode == 'fast') ||(code == 'sg8' && playCode == 'fast') ||(code == 'pt8' && playCode == 'fast') ||(code == 'pk8' && playCode == 'fast') ||(code == 'pkt' && playCode == 'fast') ||
						(code == 'sjs' && playCode == 'fast') ||(code == 'ss8' && playCode == 'fast') ||(code == 'ssn' && playCode == 'fast') ||(code == 'xyssc' && playCode == 'fast') ||(code == 'ssc' && playCode == 'fast') ||(code == 'ssg' && playCode == 'fast') ||(code == 'az8' && playCode == 'fast') ||(code == 'sgx' && playCode == 'fast')">
					<view class="lotter-tablebar-item" :class="{'active':showLotBarIndex.includes(index)}" v-for="(item, index) in tablebar" :key="index"
						@click="showMixLotBar(index)">
						<text class="lotter-t-i-text">{{ item }}</text>
					</view>
				</view>
				<view class="lotter-tablebar"
					v-if="(code != 'pks' &&code != 'sg8' &&code != 'pt8' &&code != 'pk8' &&code != 'pkt' &&code != 'sjs' &&
							code != 'ss8' &&code != 'ssn' &&code != 'xyssc' &&code != 'ssc' &&code != 'ssg' &&code != 'az8' &&code != 'sgx') || playCode != 'fast'">
					<view class="lotter-tablebar-item" :class="{'active':index==showLotBarSingleIndex}"  v-for="(item, index) in tablebar" :key="index"
						@click="showLotBar(item, index)">
						<text class="lotter-t-i-text">{{ item.name }}</text>
					</view>
				</view>
				<view class="lotter-tablebar-line">
					<!-- <view class="lotter-tablebar-item active"><text class="lotter-t-i-text">任选二<text class="color-style">6.9</text></text></view>
					<view class="lotter-tablebar-item"><text class="lotter-t-i-text">任选二<text class="color-style">6.9</text></text></view> -->
				</view>
				<!-- 快捷玩法选项 -->
				<view v-if="playCode == 'fast'">
					<view class="lotter-c-r-fold">
						<view class="lotter-c-r-fold-collection" 
							v-show="code == 'pk8' || code == 'pks' || code == 'sg8' || code == 'pkt' || code == 'pt8'">
							<view class="lotter-c-r-fold-c-item" v-for="(item, index) in lotNumData" :key="index"
								@click="selectMixLotCol(index,{'mark':index,'data':item})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectMixLotCol(index)}">
									<text class="l-c-r-f-i-name"
										:class="[{ 'showname-lot-num': isNumberFilter(item.showname)},setClass('lotname', item.showname)]">{{ item.showname }}</text> 
								</view> 
							</view>
						</view>
						<view class="lotter-c-r-fold-collection"
							v-show="code == 'sjs' || code == 'ssn' || code == 'xyssc' || code == 'ss8'">
							<view class="lotter-c-r-fold-c-item" v-for="(item, index) in lotNumData" :key="index"
								@click="selectMixLotCol(index,{'mark':index,'data':item})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectMixLotCol(index)}">
									<text class="l-c-r-f-i-name" :class="{ 'showname-sjs-num': isNumberFilter(item.showname) }"
										:style="{ background: isNumberFilter(item.showname) ? 'url(/static/img/lot_res_bg.png) 0% 0% / contain' : '' }">
										{{ item.showname }}
									</text>
								</view>
							</view>
						</view>
						<view class="lotter-c-r-fold-collection" v-show="code == 'sgx'">
							<view class="lotter-c-r-fold-c-item" v-for="(item, index) in lotNumData" :key="index"
								@click="selectMixLotCol(index,{'mark':index,'data':item})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectMixLotCol(index)}">
									<text class="l-c-r-f-i-name"
										:class="[{ 'circlenum-num': isNumberFilter(item.showname) },setClass('lotname-sgx', item.showname)]">{{ item.showname }}</text>
								</view>
							</view>
						</view>
						<view class="lotter-c-r-fold-collection" v-show="code == 'ssg' || code == 'az8'">
							<view class="lotter-c-r-fold-c-item" v-for="(item, index) in lotNumData" :key="index"
								@click="selectMixLotCol(index,{'mark':index,'data':item})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectMixLotCol(index)}">
									<text class="l-c-r-f-i-name"
										:class="[{ 'circlenum-num-one': isNumberFilter(item.showname) },setClass('lotname-ssg', item.showname)]">{{ item.showname }}</text>
								</view>
							</view>
						</view>
						<view class="lotter-c-r-fold-collection" v-show="code == 'ssc'">
							<view class="lotter-c-r-fold-c-item" v-for="(item, index) in lotNumData" :key="index"
								@click="selectMixLotCol(index,{'mark':index,'data':item})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectMixLotCol(index)}">
									<text class="l-c-r-f-i-name"
										:class="[{ 'showname-ssc-num': isNumberFilter(item.showname) },setClass('lotname-ssc', item.showname)]">
										<block v-if="!isNumberFilter(item.showname)">{{ item.showname }}</block>
									</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 非快捷玩法 -->
				<view v-if="playCode != 'fast'">
					<view class="lotter-c-r-fold">
						<view  v-for="(item, index) in lotNumData" :key="index">
						<block v-if="(code=='qlc' && item.cls=='word') || (code=='qlc' && item.cls=='circlenum') || 
                        (code=='lhc' && item.cls=='word') || (code=='lhc' && item.cls=='circlenum')|| 
                        (code=='ssn' && item.cls=='word') || (code=='ssn' && item.cls=='num') ||  (code=='ssn' && item.cls=='circlenum') || 
                        (code=='xyssc' && item.cls=='word') || (code=='xyssc' && item.cls=='num') ||  (code=='xyssc' && item.cls=='circlenum') || 
                        (code=='ssh' && item.cls=='word') || (code=='ssh' && item.cls=='num') || (code=='ssh' && item.cls=='circlenum')|| 
                        (code=='ss8' && item.cls=='word') || (code=='ss8' && item.cls=='num') || (code=='ss8' && item.cls=='circlenum') || 
                        (code=='f3d' && item.cls=='word') || (code=='f3d' && item.cls=='circlenum') || (code=='f3d' && item.cls=='num') || 
                        (code=='pl3' && item.cls=='word') || (code=='pl3' && item.cls=='circlenum') || (code=='pl3' && item.cls=='num') || 
                        (code=='sjs' && item.cls=='word')  || (code=='sjs' && item.cls=='circlenum') || (code=='sjs' && item.cls=='num') || 
                        (code=='sgx' && item.cls=='word') || (code=='sgx' && item.cls=='boxnum') ||  (code=='sgx' && item.cls=='num') || 
                        (code=='ssg' && item.cls=='word') || (code=='ssg' && item.cls=='boxnum') || (code=='ssg' && item.cls=='num')  || 
                        (code=='az8' && item.cls=='word') || (code=='az8' && item.cls=='boxnum') || (code=='az8' && item.cls=='num')  || 
                        (code=='stj' && item.cls=='word') || (code=='stj' && item.cls=='boxnum') || (code=='stj' && item.cls=='num') ||  
                        (code=='s3s' && item.cls=='word') || (code=='s3s' && item.cls=='circlenum') || (code=='s3s' && item.cls=='num')  || 
                        (code=='ssc' && item.cls=='word') || (code=='ssc' && item.cls=='boxnum') || (code=='ssc' && item.cls=='num') ||  (code=='ssc' && item.cls=='circlenum')||  
                        (code=='pk8' && item.cls=='word' && playCode!='pk8_hs') || (code=='pk8' && item.cls=='boxnum' && playCode!='pk8_hs') || (code=='pk8' && item.cls=='num' && playCode!='pk8_hs') ||  (code=='pk8' && item.cls=='circlenum' && playCode!='pk8_hs') || 
                        (code=='pt8' && item.cls=='word' && playCode!='pt8_hs') || (code=='pt8' && item.cls=='boxnum'  && playCode!='pt8_hs') || (code=='pt8' && item.cls=='num'  && playCode!='pt8_hs') ||  (code=='pt8' && item.cls=='circlenum'  && playCode!='pt8_hs')||  
                        (code=='pks' && item.cls=='word' && playCode!='pks_hs') || (code=='pks' && item.cls=='boxnum' && playCode!='pks_hs') || (code=='pks' && item.cls=='num' && playCode!='pks_hs') ||  (code=='pks' && item.cls=='circlenum' && playCode!='pks_hs')|| 
                        (code=='pkt' && item.cls=='word' && playCode!='pkt_hs') || (code=='pkt' && item.cls=='boxnum' && playCode!='pkt_hs') || (code=='pkt' && item.cls=='num' && playCode!='pkt_hs') ||  (code=='pkt' && item.cls=='circlenum' && playCode!='pkt_hs') ||
                        (code=='sg8' && item.cls=='word' && playCode!='sg8_hs') || (code=='sg8' && item.cls=='boxnum' && playCode!='sg8_hs') || (code=='sg8' && item.cls=='num' && playCode!='sg8_hs') ||  (code=='sg8' && item.cls=='circlenum' && playCode!='sg8_hs')">
						<text class="lotter-c-r-fold-title" @click="flodLotRate(index)">
							{{ item.name }}
							<text class="iconfont">
								<block v-if="!isSelectNameFlod(index)">&#xe61a;</block>
								<block v-if="isSelectNameFlod(index)">&#xe619;</block>
							</text>
						</text>
						<view class="lotter-c-r-fold-collection" v-show="!isSelectNameFlod(index)"
							v-if="playCode!='qlc_zmlm' && playCode!='lhc_zmlm' && playCode!='ssg_rx' && playCode!='az8_rx' && playCode!='qlc_ddb' && playCode!='lhc_ddb' && playCode!='stj_rx' && playCode!='f3d_2dw' && playCode!='f3d_3dw' && playCode!='pl3_2dw' && playCode!='pl3_3dw' && playCode!='ss8_zs3'"
							:class="[{'ts-zx': (playCode=='lhc_slx' || playCode=='qlc_slx' ||  playCode=='f3d_zs3' || playCode=='f3d_zs6' || playCode=='pl3_zs3' || playCode=='pl3_zs6' || playCode=='s3s_zs3' || playCode=='s3s_zs6')},`${item.cls}`]">
							<view class="lotter-c-r-fold-c-item" v-for="item2 in item.list" :key="item2.item_id">
								

								<view class="lotter-c-r-fold-c-item-c" @click="(playCode=='lhc_slx' || playCode=='qlc_slx')?selectSpecialLotCol(item2.item_id,'slx',playCode=='lhc_slx'?'lhc':'qlc',{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'}):((playCode=='f3d_zs3' || playCode=='f3d_zs6' || playCode=='pl3_zs3' || playCode=='pl3_zs6')?selectSpecialLotCol(item2.item_id,'f3d_zs3',playCode,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'}):
                    ((playCode=='s3s_zs3' || playCode=='s3s_zs6')?selectSpecialLotCol(item2.item_id,'s3s_zs3_zs6',playCode,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'}):selectLotCol(item2.item_id,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})))" :class="{'select':isSelectLotRate(item2.item_id)}">
									<!-- code=='lhc' 六合彩|| code=='qlc'极数六合 -->
									<text class="l-c-r-f-i-name" v-if="code=='qlc' || code=='lhc'"
										:class="[`circlenum-${item2.showname}`,{'circlenum-num':isNumberFilter(item2.showname)}]">{{ item2.showname }}</text>  

									<!-- code=='ssn'新疆时时彩 || code=='xyssc'新运时时彩 || code=='ssh' 天津时时彩|| code=='ss8'极速时时彩 || code=='f3d'福彩3D || code=='pl3' 体彩p3|| code=='sjs'澳洲幸运5 -->
									<text class="l-c-r-f-i-name"
										v-if="code=='ssn' || code=='xyssc' || code=='ssh' || (code=='ss8' && playCode!='ss8_zs3')"
										:class="{'circlenum-num': isNumberFilter(item2.showname)}">{{ item2.showname }}</text>

									<text class="l-c-r-f-i-name"
										v-if="(code=='f3d' && item2.num && playCode!='f3d_zs3' && playCode!='f3d_zs6') || (code=='pl3' && item2.num && playCode!='pl3_zs3' && playCode!='pl3_zs6')">{{ item2.showname }}</text>

									<text class="l-c-r-f-i-name"
										v-if="(code=='f3d' && !item2.num && playCode!='f3d_zs3' && playCode!='f3d_zs6') || (code=='pl3' && !item2.num && playCode!='pl3_zs3' && playCode!='pl3_zs6')"
										:class="{'circlenum-num':isNumberFilter(item2.showname)}">{{ item2.showname }}</text>

									<text class="l-c-r-f-i-name"
										v-if="(code=='f3d' || code=='pl3')  && (playCode=='f3d_zs3' || playCode=='f3d_zs6' || playCode=='pl3_zs3' || playCode=='pl3_zs6')"
										:class="{'circlenum-num': isNumberFilter(item2.showname)}">{{ item2.showname }}</text>

									<text class="l-c-r-f-i-name" v-if="code=='sjs'"
										:class="{'showname-sjs-num': isNumberFilter(item2.showname)}"
										:style="{'background':isNumberFilter(item2.showname) ?'url(/static/img/lot_res_bg.png) 0% 0% / contain':''}">{{ item2.showname }}</text>
									<!-- code=='sgx' 广西快乐十分|| code=='ssg' 广东快乐十分 -->
									<text class="l-c-r-f-i-name" v-if="code=='sgx'"
										:class="[`circlenum-one-${item2.showname}`,{'circlenum-num':isNumberFilter(item2.showname)}]">{{ item2.showname }}</text>

									<!-- code=='stj'  天津快乐十分 code=='az8'澳洲幸运8-->
									<text class="l-c-r-f-i-name" v-if="code=='stj'  || code=='ssg' || code=='az8'"
										:class="[`circlenum-two-${item2.showname}`,{'circlenum-num-one':isNumberFilter(item2.showname)}]">{{ item2.showname }}</text>

									<!-- code=='ssc'  重庆快乐生肖 -->
									<view class="l-c-r-f-i-name"
										v-if="code=='ssc' && (playCode=='ssc_1zh' || playCode=='ssc_zs3' || playCode=='ssc_zs6' || playCode=='ssc_kd' || playCode=='ssc_zp')"
										:class="[{'showname-ssc-num': isNumberFilter(item2.showname)}]">
										<block v-if="isNumberFilter(item2.showname)">
											<image class="ssc-img-img" mode="aspectFit" :src="sscInt(item2.showname)"></image>  
										</block>
										<block v-if="!isNumberFilter(item2.showname)">{{ item2.showname }}</block>
									</view>

									<text class="l-c-r-f-i-name"
										v-if="code=='ssc' && playCode!='ssc_1zh' && playCode!='ssc_zs3' && playCode!='ssc_zs6' && playCode!='ssc_kd' && playCode!='ssc_zp'">{{ item2.showname }}</text>

									<!-- code=='pk8' 极速赛车 || code=='pt8'极速飞艇 || code=='pks'北京pk10 || code =='pkt'幸运飞艇  || code=='sg8' SG飞艇 -->
									<text class="l-c-r-f-i-name"
										v-show="code=='pk8' || code=='pks' ||  code=='pkt' || code=='pt8' || code=='sg8'"
										:class="[`lot-${lotnumFilter(item2.showname)}`,{'showname-lot-num':isNumberFilter(item2.showname)}]">{{ item2.showname }}</text>

									<!-- code=='s3s'  江苏快3 -->
									<block v-if="code=='s3s' && playCode=='s3s_qt'">
										<block v-for="(itemImg,imgIndex) in item2.ballsArr" :key="imgIndex">
										<img width="20px" height="20px" v-if="itemImg!='*'"
											style="margin-right: 2px;"
											:src="`/static/img/sai0${itemImg}.png`" />
										<text class="l-c-r-f-i-name"
											v-if="itemImg=='*' && imgIndex==0">{{ item2.showname }}</text>
											</block>
									</block>

									<text v-if="code=='s3s' && (playCode=='s3s_zs6' || playCode=='s3s_zs3')">
										<img width="20px" height="20px" style="margin-top: 20px; margin-right: 2px;"
											:src="`/static/img/sai0${itemImg}.png`" />
									</text>

									<text class="l-c-r-f-i-name"
										v-if="code=='s3s' && playCode=='s3s_hs'">{{ item2.showname }}</text>
									<!-- 这里是赔率数据 -->
									<text class="l-c-r-f-i-rate"  
										v-if="notEmptyFilter(item2.num) && !disableBet && playCode!='lhc_slx' && playCode!='qlc_slx' && playCode!='qlc_zmlm' && playCode!='lhc_zmlm'">{{ item2.num }}</text>
									<text class="l-c-r-f-i-rate"
										v-if="notEmptyFilter(item2.num) && disableBet  && playCode!='lhc_slx' && playCode!='qlc_slx' && playCode!='qlc_zmlm' && playCode!='lhc_zmlm'">--</text>
								</view>
							</view>
						</view>
						<!-- 六合彩,极速六合,广东快乐十分的连码start -->
						<view class="lotter-c-r-fold-collection zmlm" v-show="!isSelectNameFlod(index)"
							v-if="(playCode=='qlc_zmlm' || playCode=='lhc_zmlm' || playCode=='ssg_rx' || playCode=='az8_rx' || playCode=='stj_rx') && index==0">
							<view class="lotter-c-r-fold-c-item" v-for="(item2, index2) in item.list" :key="item2.item_id" @click="selectSpecialZmlmTypeLotCol(item2,index2)" :class="specialZmlmTypeLotColLock==index2?'active':''">
								<view class="lotter-c-r-fold-c-item-c" 
									v-if="index2<2 && playCode!='ssg_rx' && playCode!='az8_rx' && playCode!='stj_rx'">
									<text class="l-c-r-f-i-name">{{ item2.rate }}</text>
								</view>
								<view class="lotter-c-r-fold-c-item-c"
									v-if="index2>=2  && playCode!='ssg_rx' && playCode!='az8_rx' && playCode!='stj_rx'">
									<text class="l-c-r-f-i-name">{{ item2.showname }}</text>
									<text class="l-c-r-f-i-rate">{{ item2.num }}</text>
								</view>
								<view class="lotter-c-r-fold-c-item-c"
									v-if="playCode=='ssg_rx' || playCode=='az8_rx' || playCode=='stj_rx'">
									<text class="l-c-r-f-i-name">{{ item2.showname }}-{{index2}}</text>
									<text class="l-c-r-f-i-rate">{{ item2.num }}</text>
								</view>
							</view>
						</view>
						<view class="lotter-c-r-fold-collection zmlm" v-show="!isSelectNameFlod(index)"
							v-if="(playCode=='qlc_zmlm' || playCode=='lhc_zmlm' || playCode=='ssg_rx' || playCode=='az8_rx' || playCode=='stj_rx') && index!=0">
							<view class="lotter-c-r-fold-c-item" v-for="item2 in item.list" :key="item2.item_id" @click="(playCode=='qlc_zmlm' || playCode=='lhc_zmlm')?selectSpecialZmlmLotCol(item2.item_id,'zmlm'):selectSpecialZmlmLotCol(item2.item_id)">
								<view class="lotter-c-r-fold-c-item-c" v-if="code!='ssg' && code!='az8'" :class="selectZmlmArr.includes(item2.item_id)?'select':''">
									<text class="l-c-r-f-i-name" :class="[{'circlenum-num':isNumberFilter(item2.showname)},`circlenum-${item2.showname}`]">{{item2.showname}}</text>
								</view>
								<view class="lotter-c-r-fold-c-item-c" v-if="code=='ssg' || code=='az8'" :class="selectZmlmArr.includes(item2.item_id)?'select':''">
									<text class="l-c-r-f-i-name" :class="[{'circlenum-num-one': isNumberFilter(item2.showname)},`circlenum-two-${item2.showname}`]">{{ item2.showname }}</text>
								</view>
							</view>
						</view>
						<!-- 六合彩,极速六合,广东快乐十分的连码end -->

						<!-- 极速时时彩的组三start -->
						<view class="lotter-c-r-fold-collection" v-show="!isSelectNameFlod(index)"
							v-if="playCode=='ss8_zs3' && index==0">
							<view class="lotter-c-r-fold-c-item" v-for="(item2, index2) in item.list" :key="item2.item_id" @click="selectSpecialZmlmTypeLotCol(item2,index2)" :class="specialZmlmTypeLotColLock==index2?'active':''">
								<view class="lotter-c-r-fold-c-item-c">
									<text class="l-c-r-f-i-name">{{ item2.showname }}</text>
									<text class="l-c-r-f-i-rate">
										<block v-if="specialZmlmTypeLotColLock==index2">{{specialRateVal}}</block>
										<block v-if="specialZmlmTypeLotColLock!=index2">--</block>
									</text>
								</view>
							</view>
						</view>
						<view class="lotter-c-r-fold-collection" v-show="!isSelectNameFlod(index)"
							v-if="playCode=='ss8_zs3' && index!=0">
							<view class="lotter-c-r-fold-c-item" v-for="item2 in item.list" :key="item2.item_id" @click="selectSpecialLotCol(item2.item_id,'ss8_zs3','',{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectLotRate(item2.item_id)}">
									<text class="l-c-r-f-i-name">{{ item2.showname }}</text>
								</view>
							</view>
						</view>
						<!-- 极速时时彩的组三end -->
						<!-- 福彩3d start -->
						<view class="lotter-c-r-fold-collection" v-show="!isSelectNameFlod(index)"
							v-if="playCode=='f3d_2dw' || playCode=='f3d_3dw' || playCode=='pl3_2dw'|| playCode=='pl3_3dw'">
							<view class="lotter-c-r-fold-c-item" v-for="item2 in item.list" :key="item2.item_id" @click="selectF3dLotCol(item2.item_id,playCode,index,{'name':item2.showname,'id':item2.item_id})">
								<view class="lotter-c-r-fold-c-item-c" v-if="(code=='f3d' && !item2.num) || (code=='pl3' && !item2.num)" :class="{'select':isSelectF3DLotRate(item2.item_id,index)}">
									<text class="l-c-r-f-i-name" :class="{'circlenum-num':isNumberFilter(item2.showname)}">{{ item2.showname }}</text>
								</view>
							</view>
						</view>
						<!-- 福彩3d end -->
						</block>
						<!-- 特殊冠亚合 -->
						<block v-if="(code=='pkt' && item.cls=='word' && playCode=='pkt_hs') || (code=='pkt' && item.cls=='boxnum' && playCode=='pkt_hs') || (code=='pkt' && item.cls=='num' && playCode=='pkt_hs') ||  (code=='pkt' && item.cls=='circlenum' && playCode=='pkt_hs') ||
              (code=='pt8' && item.cls=='word' && playCode=='pt8_hs') || (code=='pt8' && item.cls=='boxnum'  && playCode=='pt8_hs') || (code=='pt8' && item.cls=='num'  && playCode=='pt8_hs') ||  (code=='pt8' && item.cls=='circlenum'  && playCode=='pt8_hs') ||
              (code=='pk8' && item.cls=='word' && playCode=='pk8_hs') || (code=='pk8' && item.cls=='boxnum' && playCode=='pk8_hs') || (code=='pk8' && item.cls=='num' && playCode=='pk8_hs') ||  (code=='pk8' && item.cls=='circlenum' && playCode=='pk8_hs')||
              (code=='pks' && item.cls=='word' && playCode=='pks_hs') || (code=='pks' && item.cls=='boxnum' && playCode=='pks_hs') || (code=='pks' && item.cls=='num' && playCode=='pks_hs') ||  (code=='pks' && item.cls=='circlenum' && playCode=='pks_hs') ||
              (code=='sg8' && item.cls=='word' && playCode=='sg8_hs') || (code=='sg8' && item.cls=='boxnum' && playCode=='sg8_hs') || (code=='sg8' && item.cls=='num' && playCode=='sg8_hs') ||  (code=='sg8' && item.cls=='circlenum' && playCode=='sg8_hs')">
						<text class="lotter-c-r-fold-title" @click="flodLotRate(index)">
							{{ item.name }}
							<text class="iconfont">
								<block v-if="!isSelectNameFlod(index)">&#xe61a;</block>
								<block v-if="isSelectNameFlod(index)">&#xe619;</block>
							</text>
						</text>
						<view class="lotter-c-r-fold-collection" v-show="!isSelectNameFlod(index)">
							<view class="lotter-c-r-fold-c-item lotter-c-r-fold-c-item-tsgy" @click="selectLotCol(item2.item_id,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})" v-for="item2 in item.list" :key="item2.item_id" :style="{'width':isNumberFilter(item2.showname)?'33%':'49.5%','flex-direction':isNumberFilter(item2.showname)?'column':'row'}">   
								<view class="lotter-c-r-fold-c-item-c" :style="{'flex-direction':isNumberFilter(item2.showname)?'column':'row'}" :class="{'select':isSelectLotRate(item2.item_id)}">
									<text class="l-c-r-f-i-name">{{ item2.showname }}</text>
									<text class="l-c-r-f-i-rate">{{ item2.num }}</text>
								</view>
							</view>
						</view>
						</block>
						<!-- 默认的非wordcirclenum和wordnum显示 -->
						<block v-if="code!='qlc'&&code!='lhc'&&code!='ssn' &&code!='xyssc' &&code!='ssh' &&code!='ss8'&&code!='f3d'&&code!='pl3'&&code!='sjs' && code!='sgx'&&code!='ssg' &&code!='az8' &&code!='stj' &&code!='s3s'&&code!='ssc'&& code!='pk8' &&code!='pt8'&& code!='pks' && code!='sg8' && code!='pkt' && item.cls!='wordcirclenum' && item.cls!='wordnum'">
						<text class="lotter-c-r-fold-title" @click="flodLotRate(index)">
							{{ item.name }}
							<text class="iconfont">
								<block v-if="!isSelectNameFlod(index)">&#xe61a;</block>
								<block v-if="isSelectNameFlod(index)">&#xe619;</block>
							</text>
						</text>
						<view class="lotter-c-r-fold-collection" v-show="!isSelectNameFlod(index)">
							<view class="lotter-c-r-fold-c-item" @click="selectLotCol(item2.item_id,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})" v-for="item2 in item.list" :key="item2.item_id">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectLotRate(item2.item_id)}">
									<text class="l-c-r-f-i-name">{{ item2.showname }}</text>
									<text class="l-c-r-f-i-rate">{{ item2.num }}</text>
								</view>
							</view>
						</view>
						</block>
						<!-- 文字圆框wordcirclenum，文字数字wordnum -->
						<block v-if="item.cls=='wordcirclenum' || item.cls=='wordnum'">
						<text class="lotter-c-r-fold-title" @click="flodLotRate(index)">
							{{ item.name }}
							<text class="iconfont">
								<block v-if="!isSelectNameFlod(index)">&#xe61a;</block>
								<block v-if="isSelectNameFlod(index)">&#xe619;</block>
							</text>
						</text>
						<view class="lotter-c-r-fold-collection" v-if="code!='lhc' && code!='qlc'"  v-show="!isSelectNameFlod(index)">
							<view class="lotter-c-r-fold-c-item-hx" v-for="item2 in item.list" :key="item2.item_id" @click="selectLotCol(item2.item_id,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})" :class="{'select':isSelectLotRate(item2.item_id)}">
								<view class="lotter-c-r-fold-c-item-c-left">
									<text class="show-name">{{item2.showname}}</text>
									<!-- 倍率 -->
									<text class="show-rate">{{item2.num}}</text>
									<text class="iconfont show-name-dec">&#xe618;</text>
								</view>
								<view class="lotter-c-r-fold-c-item-c-right">
									<text v-for="(item3,index3) in item2.shownum" :key="index3" :class="[{'other-num-arr':isNumberFilter(item3),'other-num-err':!isNumberFilter(item3)}]"> 
										{{item3}}
									</text>  
								</view>
							</view>
						</view>

						 <!-- 极速六合彩，六合彩 -->
						<view class="lotter-c-r-fold-collection" v-if="code=='lhc' || code=='qlc'"  v-show="!isSelectNameFlod(index)">
							<!-- 六合彩中色波 -->
							<block v-if="(playCode=='lhc_sb' || playCode=='qlc_sb') &&  playCode!='lhc_sxd' && playCode!='qlc_sxd'">
							<view class="lotter-c-r-fold-c-item"  v-for="item2 in item.list" :key="item2.item_id" @click="selectLotCol(item2.item_id,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})">
								<view class="lotter-c-r-fold-c-item-c" :class="{'select':isSelectLotRate(item2.item_id)}">
									<text class="l-c-r-f-i-name">{{ item2.showname }}</text>
									<text class="l-c-r-f-i-rate">{{ item2.num }}</text>
								</view>
							</view>
							</block>
							<!-- 合肖的样式处理 -->
							<block v-if="playCode=='lhc_sxd' || playCode=='qlc_sxd'">
							<view class="lotter-c-r-fold-c-item-hx"  v-for="item2 in item.list" :key="item2.item_id" @click="selectSpecialLotCol(item2.item_id,'sxd',playCode=='lhc_sxd'?'lhc':'qlc',{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})" :class="{'select':isSelectLotRate(item2.item_id)}">
								<view class="lotter-c-r-fold-c-item-c-left">
									<text class="show-name">{{item2.showname}}</text>
									<text class="iconfont show-name-dec">&#xe618;</text>
								</view>
								<view class="lotter-c-r-fold-c-item-c-right">
									<text v-for="(item3,index3) in item2.shownum" :key="index3" :class="[{'other-num-arr':isNumberFilter(item3),'other-num-err':!isNumberFilter(item3)},`rate-lhc-qlc-lot-${item3}`]"> 
										{{item3}}
									</text>
								</view>
							</view>
							</block>
							<block v-if="(playCode!='lhc_sb' && playCode!='qlc_sb' && playCode!='lhc_sxd') && playCode!='lhc_sxd' && playCode!='qlc_sxd'">
							<view class="lotter-c-r-fold-c-item-hx"  v-for="item2 in item.list" :key="item2.item_id" @click="(playCode=='qlc_ddb' || playCode=='lhc_ddb')?selectSpecialZmlmLotCol(item2.item_id):selectLotCol(item2.item_id,{'id':item2.item_id,'name':item2.showname,'pname':item.name,'balls':item2.balls,'rate':item2.num,'cash':'0'})" :class="(playCode=='qlc_ddb' || playCode=='lhc_ddb')?(selectZmlmArr.includes(item2.item_id)?'select':''):(isSelectLotRate(item2.item_id)?'select':'')">
								<view class="lotter-c-r-fold-c-item-c-left">
									<text class="show-name">{{item2.showname}}</text>
									<!-- 倍率 -->
									<text class="show-rate">{{item2.num}}</text>
									<text class="iconfont show-name-dec">&#xe618;</text>
								</view>
								<view class="lotter-c-r-fold-c-item-c-right">
									<text v-for="(item3,index3) in item2.shownum" :key="index3" :class="[{'other-num-arr':isNumberFilter(item3),'other-num-err':!isNumberFilter(item3)},`rate-lhc-qlc-lot-${item3}`]"> 
										{{item3}}
									</text>
								</view>
							</view>
						</block>
						</view>
						</block>
					</view>


					</view>
					

				</view>
			</view>
		</view>
		<Tabbar :indexpage="-1" :isLotter="true"></Tabbar>
		<view class="bet-contain" v-if="fastShowState">
			<view class="bet-c-msg">
				<text class="bet-c-msg-span">共1注0元</text>
			</view>
			<view class="bet-c-money">
				<text class="bet-c-money-span">1</text>
				<text class="bet-c-money-span">20</text>
				<text class="bet-c-money-span">300</text>
				<text class="bet-c-money-span">4000</text>
				<text class="bet-c-money-span">50000</text>
				<text class="bet-c-money-span">编辑</text>
			</view>
			<view class="bet-c-operate">
				<label class="bet-c-o-input"><input class="uni-input bet-c-o-input-i" v-model="betInputVal"  placeholder="最低投注1元" /></label>
				<label class="bet-c-o-ch"><checkbox value=""  />预设金额</label>
				<label class="bet-c-o-cancel" @click="onReset()">取消</label>
				<label class="bet-c-o-submit" @click="onFastSubmit()">确认</label>
			</view>
		</view>
		<view class="mark-contain"  style="display:none;">
			<view class="pre-set-money mark-contain-c">
				<view class="m-contain-div-header">
					预设金额
					<text class="iconfont close">&#xe672;</text>
				</view>
				<view class="m-contain-div-content">
					<view class="input-v">
						<input class="input-money" type="text" value="1" />
					</view>
					<view class="input-v">
						<input class="input-money" type="text" value="2" />
					</view>
					<view class="input-v">
						<input class="input-money" type="text" value="3" />
					</view>
					<view class="input-v">
						<input class="input-money" type="text" value="4" />
					</view>
					<view class="input-v">
						<input class="input-money" type="text" value="5" />
					</view>
				</view>
				<view class="m-contain-div-footer">
					<view class="m-contain-div-f-radio">
						<label class="radio"><radio value="r1" color="#ff6565" style="transform:scale(0.7)" />选中</label>
                		<label class="radio"><radio value="r2" color="#ff6565" style="transform:scale(0.7)" />未选中</label>
					</view>
					<view class="m-contain-div-f-submit">
						<text class="m-contain-div-f-s-btn">确认</text>
					</view>
				</view>
			</view>
		</view>
		<view class="mark-contain" v-if="isMarkWin">	
			<view class="bet-res mark-contain-c">
				<view class="m-contain-div-header">
					<text class="header-tit">{{name}}</text>
					投注成功
				</view>
				<view class="m-contain-div-content">
					<view class="bet-list-header">
						<text style="flex:6;">玩法</text>
						<text style="flex:3;text-align:center;">金额</text>
						<text style="flex:3;text-align:center;">可赢金额</text>
					</view>
					<view style="height:60rpx;"></view>  
					<view class="bet-list" v-for="(item, index) in betSuccessObj.orders" :key="index">
						<text style="flex:6;">
							<text style="color:#27c5ff" v-if="notEmptyFilter(item.lotname)">{{item.lotname}}/</text>  
							 <rich-text style="color:#27c5ff;display:inline-block;" :nodes="item.depiction"></rich-text>
							 <text style="color:#27c5ff">@</text><text style="color: red;">{{item.rate}}</text>
						</text>
						<text style="flex:3;text-align:center;">{{decimal(item.cash,'no')}}</text>     
						<text style="flex:3;text-align:center;">{{decimal(item.result2,'three')}}</text>  
					</view>
				</view>
				<view class="m-contain-div-footer">
					<view class="m-contain-div-f-radio">
						<view class="m-contain-div-f-sum">
							<text style="flex:6;">总计({{betSuccessObj.sum.cnt}}注)</text>
							<text style="flex:3;text-align:center;">{{decimal(betSuccessObj.sum.sum,'no')}}</text>  
							<text style="flex:3;text-align:center;"> {{decimal(betSuccessObj.sum.sum_result2)}}</text>   
						</view>
					</view>
					<view class="m-contain-div-f-submit">
						<text class="m-contain-div-f-s-btn" @click="onCloseMask()">确认</text>
					</view>
				</view>
			</view>
		</view>
		<!-- <view class="mark-menu-contain">
			<view class="mark"></view>
		</view> -->
	</view>
</template>

<script>
	import {
		Tools,
		Config,
		URL,
		Net,
		VueTools
	} from '@/common/tools.js';
	import navigation from '@/components/navigation.vue';
	import Tabbar from '@/components/tabbar.vue';
	export default {
		components: {
			Tabbar,
			navigation
		},
		data() {
			return {
				code: '',
				lotteryId: '',
				name: '',
				lotterCLeftHeight: '0px',
				lotsMenuSelectIndex: -1, //做为选择左侧玩法的临时存储变量---
				lotsMenu: [], //左侧的玩法数据
				playABCD: '', //是具体的ABCD哪个盘口
				regionNum: '', //盘口的数量
				regionArr: [], //ABCD的盘口数组
				selectPlayItemData: {}, //选中玩法传递数据
				clickMark: -1, //选中玩法的标记--
				playCode: '', //玩法的code值
				specialZmlmTypeLotColItem: '', //连码的特殊数据
				showLotBarIndex:[],//快捷tabbar上面选中的下标数组---
				showLotBarSingleIndex:0,//tabbar上面选中下标的值---
				selectLotItemID:[],//多项选择赔率的存储值(手动拼合)---
				tablebar: [], //有tabbarbar的数据的
				lotNumData: [], //盘口上面的数据
				lotSelectNameFlod: [], //小类别中的折叠
				
				
				

				specialRateVal: 0, //自选不中，组选三，组选六，红码组合，黑码组合
				specialZmlmTypeLotColLock: 0, //连码选中的下标---
				disableBet: false, //是否禁止下注


				selectLotNumber: 0,//选择了多少个倍率
  				betMoney:0,//输入投资的金额input
   				selectLotNumberArr:[],//选择倍率的数据，拼接成数值

  				fast: true,  //默认是快速投注的效果
   				fastShowState: false,//快速投资的地板面板默认隐藏
   				betTotalMoney: 0,//计算的总投资额
   				betInputVal: 0,//投资的input的输入值
   				isResOrFastmoney:  false,//false是金额页，true是结果
   				isMarkWin: false, //蒙版窗口的显示或隐藏
 
   				fastDefaultMoneyList: { "o": 1, "t": 20, "th": 300, "f": 4000, "fi": 50000 },
   				fastMoneyList: { "o": 1, "t": 20, "th": 300, "f": 4000, "fi": 50000 },
   				betSuccessObj: {"sum":{}}, //投注成功后的数据回显
  	 			mixRateSelect: [],//快捷玩法的赔率--

   				mixBetArr: [],//类型和赔率最后需要提交的值的综合

  
   				selectZmlmNum: 1,//连码的选中个数
   				selectZmlmArr: [],//选中连码的数组
   				specialData:  [],//特殊组合的数据
   				f3dLotData:  [],//福彩3d存储的数据
				f3dzx3_zx6:  [],//福彩3d的组选3和组选6的的一条数据
				   
				//福彩3d,体彩3d的二字和三字的数组
				f_p_3d_oneArr:[],
				f_p_3d_twoArr:[],
				f_p_3d_threeArr:[],

			};
		},
		onLoad(option) {
			uni.$emit('isClearTimeOut', {
				isClear: true
			});
			this.code = option.code;
			this.lotteryId = option.lotteryId;
			this.name = option.name;
			VueTools.setStorageSync(Config.LOTTER_DETAIL_PARAMS, {
				code: option.code,
				name: option.name,
				lotteryId: option.lotteryId
			});
			this.getAutoLotterCLeftHeight();
			this.getPlay();
		},
		methods: {
			setClass(type, value) {
				//动态的设置类的值
				if (type == 'lotname') {
					return 'lot-' + (parseInt(value) % 10);
				} else if (type == 'lotname-sgx') {
					return 'circlenum-one-' + value;
				} else if (type == 'lotname-ssg') {
					return 'circlenum-two-' + value;
				} else if (type == 'lotname-ssc') {
					return 'showname-ssc-' + value;
				} else if (type == 'cls') {
					return value;
				}
			},
			getAutoLotterCLeftHeight() {
				this.lotterCLeftHeight = this.$window.screenHeight - (this.customBar + this.statusBar) - 50 - 90 - 40 +
					'px';
				//计算获取左边的一个高度
				uni.onWindowResize(res => {
					this.lotterCLeftHeight = res.size.windowHeight - (this.customBar + this.statusBar) - 50 - 90 -
						40 + 'px';
					console.log('wew-', this.lotterCLeftHeight);
				});
			},
			getPlay() {
				//左侧的小的玩法
				let that = this;
				let data = VueTools.getStorageSync(Config.PLAYER_KEY + that.code);
				if (Tools.isEmpty(data)) {
					that.getPlayNet();
					return;
				}
				that.showMixPlay(data);
				that.playABCD = data.region;
				that.regionNum = data.regions_cnt;
				that.regionArr = [];
				for (let item in data.regions2) {
					that.regionArr.push({
						key: item,
						name: data.regions2[item]
					});
				}
				console.log('缓存加载的玩法菜单数据:', data);
			},
			getPlayNet() {
				//左侧的小的玩法网络请求
				let that = this;
				Net.ayiHttp(
					URL.USER_PLAY,
					'{"toplotcode":"' + that.code + '"}',
					function (res) {
						if (res.code == Config.SUCCESS_CODE) {
							//成功的逻辑
							let data = Tools.aesDecodeToJson(res.data);
							VueTools.setStorageSync(Config.PLAYER_KEY + that.code, data);
							that.showMixPlay(data);
							that.playABCD = data.region;
							that.regionNum = data.regions_cnt;
							that.regionArr = [];
							for (let item in data.regions2) {
								that.regionArr.push({
									key: item,
									name: data.regions2[item]
								});
							}
							console.log('网络加载的玩法菜单数据:', data);
						} else if (res.code == Config.FAIL_CODE) {
							VueTools.toastNo(res.message);
						} else if (res.code == Config.LOGIN_CODE) {
							uni.navigateTo({
								url: '/pages/my/login/login'
							});
						}
					},
					function (err) {
						console.log('error:', err);
					}
				);
			},
			showMixPlay(data) {
				let that = this;
				//有快捷玩法的处理
				if (that.code == 'pks' || that.code == 'sg8' || that.code == 'pt8' || that.code == 'pk8' || that.code ==
					'pkt' || that.code == 'sjs' || that.code == 'ss8' || that.code == 'ssn' || that.code == 'xyssc' || that
					.code == 'ssc' || that.code == 'ssg' || that.code == 'az8' || that.code == 'sgx') {
					let kj = {
						code: 'fast',
						title: '快捷'
					};
					if (data.lotsMenu.length > 0) {
						if (data.lotsMenu[0]['code'] == 'fast') {
							that.lotsMenu = data.lotsMenu;
							that.lotsMenu[0].isActive = false;
						} else {
							that.lotsMenu = data.lotsMenu;
							that.lotsMenu.unshift(kj);
						}
						// if (Tools.isEmpty($('app-root').attr('playMark'))) {
						// 	that.initSelectPlay(1);
						// } else {
						// 	if (!that.isDiffCode) {
						// 		that.initSelectPlay($('app-root').attr('playMark'));
						// 	} else {
						// 		that.initSelectPlay(1);
						// 	}
						// }
					}
				} else {
					that.lotsMenu = data.lotsMenu;
					if (that.lotsMenu.length > 0) {
						// if (Tools.isEmpty($('app-root').attr('playMark'))) {
						// 	that.initSelectPlay(0);
						// } else {
						// 	if (!that.isDiffCode) {
						// 		that.initSelectPlay($('app-root').attr('playMark'));
						// 	} else {
						// 		that.initSelectPlay(0);
						// 	}
						// }
					}
				}
			},
			showLotData(item, index) {
				let that = this;
				if (this.clickMark == index) {
					return;
				}
				this.resetVal();//重新重置值
				this.selectPlayItemData = item;
				this.lotsMenuSelectIndex = index;
				this.clickMark = index;
				let lid = Tools.isEmpty(item.lid) ? '' : item.lid;
				let code = Tools.isEmpty(item.code) ? '' : item.code;
				if ((code == 'ssg_dw8' && lid != '9') || (code == 'az8_dw8' && lid != '9') || (code == 'stj_dw8' && lid !=
						'9')) {
					this.showLotNet(code + lid, code);
				} else {
					this.showLotNet(code, code);
				}
			},
			showLotNet(playCode, realPlayCode,item="") {
				let that = this;
				let d = VueTools.getStorageSync(Config.RATE_KEY + that.code + that.playABCD);
				if (Tools.isEmpty(d)) {
					//没有缓存数据就请求网络数据
					Net.ayiHttp(
						URL.LOTTERY_GETODDS,
						'{"topcode":"' + that.code + '","region":"' + that.playABCD + '"}',
						function (res) {
							res = Tools.replaceFirstChar(Tools.replaceFirstChar(res, '(', ''), ')', '');
							if (Tools.isStringJson(res)) {
								res = JSON.parse(res);
								//存储是否加密的处理待处理
								if (res.code == Config.SUCCESS_CODE) {
									//成功的逻辑
									let data = res.data;
									VueTools.setStorageSync(Config.RATE_KEY + that.code + that.playABCD, data);
									that.lotDataDeal(playCode, realPlayCode, data,item);
								} else if (res.code == Config.FAIL_CODE) {
									VueTools.toastNo(res.message);
								} else if (res.code == Config.LOGIN_CODE) {
									uni.navigateTo({
										url: '/pages/my/login/login'
									});
								}
							} else {
								VueTools.toastNo('数据加载失败请重试...');
							}
						},
						function (err) {
							console.log('error:', err);
						}
					);
					return;
				}
				that.lotDataDeal(playCode, realPlayCode, d,item);
			},
			specialZmlm(arr) {
				//特殊的六合彩和极速六合的特殊连码的结果处理
				function isCN(str) {
					if (escape(str).indexOf('%u') < 0) {
						return false;
					} else {
						return true;
					}
				}

				function objSort(arr) {
					arr.sort(function (a, b) {
						var f = a.rate;
						if (f === undefined || f === null || f === '' || f === ' ' || f === '　' || isCN(f)) {
							return -1;
						}
					});
					return arr;
				}

				function numReplaceStr(targetData, keyName) {
					var tempArr = targetData[keyName].split('/');
					if (tempArr.length == 2) {
						var arr0 = tempArr[0].match(/\d+(.\d+)?/g);
						var arr1 = tempArr[1].match(/\d+(.\d+)?/g);
						var cn0 = tempArr[0].replace(/\d+(.\d+)?/g, '');
						var cn1 = tempArr[1].replace(/\d+(.\d+)?/g, '');
						targetData[keyName] = cn0 + '<span style="color:#ff4a4a">' + arr0 + '</span>' + '/' + cn1 +
							'<span  style="color:#ff4a4a">' + arr1 + '</span>';
						targetData['resRate'] = arr0 + '/' + arr1;
					} else {
						targetData['resRate'] = targetData[keyName];
					}
				}
				var res = objSort(arr);
				for (var item in res) {
					numReplaceStr(res[item], 'rate');
				}
				return res;
			},
			s3s_qtDeail(data) {
				//江苏快3 三军二字三字组合特殊的情况
				for (let item in data) {
					let list = data[item]['list'];
					for (let item01 in list) {
						data[item]['list'][item01]['ballsArr'] = list[item01]['balls'].toString().split('|');
					}
				}
				return data;
			},
			f3dlotArr(num, nameArr) {
				//福彩3d的数据拼接并返回数据
				let tempArr = [];
				let tempTowArr = [];
				for (let i = 0; i < num; i++) {
					tempTowArr = [];
					for (let j = 0; j < 10; j++) {
						tempTowArr.push({
							item_id: 'o' + i + 't' + j,
							showname: j,
							num: ''
						});
					}
					tempArr.push({
						cls: 'num',
						list: tempTowArr,
						name: nameArr[i]
					});
				}
				console.log('拼接的数据:', tempArr);
				return tempArr;
			},
			f3d_3zhData(arr) {
				//福彩3d的三字的数据单独处理
				let arr0 = [],
					arr1 = [],
					arr2 = [],
					arr3 = [],
					arr4 = [],
					arr5 = [],
					arr6 = [],
					arr7 = [],
					arr8 = [],
					arr9 = [];
				let resArr = [];
				for (let item in arr) {
					let showName = arr[item].showname;
					let firstNum = showName.substr(0, 1);
					if (firstNum == '0') {
						arr0.push(arr[item]);
					} else if (firstNum == '1') {
						arr1.push(arr[item]);
					} else if (firstNum == '2') {
						arr2.push(arr[item]);
					} else if (firstNum == '3') {
						arr3.push(arr[item]);
					} else if (firstNum == '4') {
						arr4.push(arr[item]);
					} else if (firstNum == '5') {
						arr5.push(arr[item]);
					} else if (firstNum == '6') {
						arr6.push(arr[item]);
					} else if (firstNum == '7') {
						arr7.push(arr[item]);
					} else if (firstNum == '8') {
						arr8.push(arr[item]);
					} else if (firstNum == '9') {
						arr9.push(arr[item]);
					}
				}
				resArr.push({
					cls: 'num',
					list: arr0,
					name: '零头'
				}, {
					cls: 'num',
					list: arr1,
					name: '一头'
				}, {
					cls: 'num',
					list: arr2,
					name: '二头'
				}, {
					cls: 'num',
					list: arr3,
					name: '三头'
				}, {
					cls: 'num',
					list: arr4,
					name: '四头'
				}, {
					cls: 'num',
					list: arr5,
					name: '五头'
				}, {
					cls: 'num',
					list: arr6,
					name: '六头'
				}, {
					cls: 'num',
					list: arr7,
					name: '七头'
				}, {
					cls: 'num',
					list: arr8,
					name: '八头'
				}, {
					cls: 'num',
					list: arr9,
					name: '九头'
				});
				return resArr;
			},
			lotDataDeal(playCode, realPlayCode, data,item="") {
				//盘口数据的整理
				let that = this;
				let lid = Tools.isEmpty(item.lid) ? '' : item.lid;
				let tempData = data[playCode+lid];
				if (playCode == 'qlc_zmlm' || playCode == 'lhc_zmlm') {
					//六合彩中的连码特殊处理
					tempData['item'][0]['list'] = that.specialZmlm(tempData['item'][0]['list']);
					that.specialZmlmTypeLotColItem = tempData['item'][0]['list'][0];
				} else if (playCode == 'ssg_rx' || playCode == 'az8_rx' || playCode == 'stj_rx') {
					//广东快乐十分,天津快乐十分,澳洲幸运8
					that.specialZmlmTypeLotColItem = tempData['item'][0]['list'][0];
				} else if (playCode == 'qlc_ddb' || playCode == 'lhc_ddb') {
					//六合彩中的连肖连尾
					that.specialZmlmTypeLotColItem = tempData.tablebar[0];
				} else if (playCode == 'ss8_zs3') {
					//极速时时彩组选三
					that.specialZmlmTypeLotColItem = tempData['item'][0]['list'][0];
				}
				that.playCode = realPlayCode;
				if (!Tools.isEmpty(tempData) && !Tools.isEmpty(tempData.item) && tempData.item.length > 0) {
					if (playCode == 's3s_qt') {
						that.lotNumData = that.s3s_qtDeail(tempData.item);
					} else if (playCode == 'f3d_2dw' || playCode == 'pl3_2dw') {
						//福彩3d,体彩3d的二字
						that.f3dLotData = tempData.item;
						if(Tools.isEmpty(item)){
							that.lotNumData = that.f3dlotArr(2, ['佰位', '拾位']);
						}else{
							if (item.lid == '55' || item.lid == '234') {//佰拾定位
			                that.lotNumData = that.f3dlotArr(2, ['佰位', '拾位']);
			              } else if (item.lid == '56' || item.lid == '235') {//佰个定位
			                that.lotNumData = that.f3dlotArr(2, ['佰位', '个位']);
			              } else if (item.lid == '57' || item.lid == '236') {//拾个定位
			                that.lotNumData = that.f3dlotArr(2, ['拾位', '个位']);
			              }
						}
						
					} else if (playCode == 'f3d_3dw' || playCode == 'pl3_3dw') {
						//福彩3d,体彩3d的三字
						that.f3dLotData = tempData.item;
						that.lotNumData = that.f3dlotArr(3, ['佰位', '拾位', '个位']);
					} else if (playCode == 'f3d_zs3' || playCode == 'f3d_zs6' || playCode == 's3s_zs3' || playCode ==
						's3s_zs6' || playCode == 'pl3_zs3' || playCode == 'pl3_zs6') {
						//福彩3d,体彩p3的组选3或组选6,江苏快三红码组合或黑码组合
						let temp = tempData.item;
						if (temp.length >= 2) {
							//限定以防止福彩3d的组选3或组选6报错
							that.f3dzx3_zx6 = temp.shift();
							that.lotNumData = temp;
						} else {
							that.lotNumData = tempData.item;
						}
					} else if (playCode == 'f3d_3zh' || playCode == 'pl3_3zh') {
						//福彩3d的三字,体彩3d的三字
						that.lotNumData = that.f3d_3zhData(tempData.item[0].list);
					} else {
						that.lotNumData = tempData.item;
					}
				} else {
					that.lotNumData = [];
				}
				if (!Tools.isEmpty(tempData) && !Tools.isEmpty(tempData.tablebar) && tempData.tablebar.length > 0) {
					that.tablebar = tempData.tablebar;
				} else {
					that.tablebar = [];
				}
				if (that.tablebar.length > 0) {
					if (Tools.isExitKey(that.tablebar[0], 'name')) {
						that.tablebar[0]['isActive'] = true;
					}
					//  $(".lot-tabbar ul").css({ "width": that.tablebar.length * 120, "height": '50px' });
				} else {
					// $(".lot-tabbar ul").css({ "height": '0px' });
				}
				console.log('当前的彩种code:' + this.code + '-小的玩法playCode:' + this.playCode);
				console.log('盘口', tempData);
			},
			getLotterData() {
				//右侧的具体的赔率
			},
			/**
			 * 选择快捷的tablebar
			 * @param index
			 */
			showMixLotBar(index) {
				this.commonSelectStoreArray(index,this.showLotBarIndex);
				this.addMixType();
			},
			/**
			 * 选择非快捷有tablebar
			 * @param {Object} item
			 * @param {Object} mark
			 */
			showLotBar(item, mark) {
				 if (this.showLotBarSingleIndex != mark) {
					 this.resetVal();//重置值
				      if (this.playCode == 'qlc_ddb' || this.playCode == 'lhc_ddb') { 
						 // 连肖连尾
				        this.specialZmlmTypeLotColItem = item;
				        this.fastShowState = false;
					  }
				      this.showLotBarSingleIndex = mark;
					  this.showLotNet(this.playCode,this.playCode,item);
				    }
				console.log('index:' + mark + '-item:' + JSON.stringify(item));
			},
			/**
			 * 选择快捷的盘口
			 * @param {Object} index  下标
			 * @param {Object} item  选中盘口的item值
			 */
			selectMixLotCol(index, item) {
				// if (this.disableBet) {
				//       VueTools.toastNo("已经处于封盘中");
				//       return;
				//     }
					this.commonSelectStoreItem(item,"mark",index,this.mixRateSelect);
				    this.addMixType();
			},
			/**
			 * 对模板的一个判断,是否是选中快捷盘口
			 * @param  index  快捷投资选中赔率的下标
			 */
			isSelectMixLotCol(index){
				return Tools.isExitObjKey(this.mixRateSelect,"mark",index);
			},
			/**
			 * 选择快捷赔率的数据的处理
			 */
			  addMixType() {
			    let sumCount = 0;
			    let testArr = [];
			    let mixArr = [];				
			    for (let itemF in this.showLotBarIndex) {
			      mixArr.push(this.showLotBarIndex[itemF]);
			      let index = 0;
			      for (let item in this.mixRateSelect) {
			         if (!Tools.isEmpty(this.mixRateSelect[item]['data']['item_id'][this.showLotBarIndex[itemF]])) {
			          let temp = { "id": this.mixRateSelect[item]['data']['item_id'][this.showLotBarIndex[itemF]], 'lotcode': this.mixRateSelect[item]['data']['lotcode'], 'cash': 0 };
			          testArr.push(temp);
			          sumCount++;
			          index++;
			         }
			      }
			    }
			    if (testArr.length > 0) {
			      this.fastShowState = true;
			      this.deailPresetVal();
			    } else {
			      this.fastShowState = false;
			    }
			    this.fastExcludeDragonTiger(mixArr);
			    this.mixBetArr = testArr;
			    this.selectLotNumber = sumCount;
			    //计算投资总投资额
			    this.calculateTotalBetMoney();
				console.log("快捷投资选中盘口的数据:",testArr);
			  },
			    /**
			     * 快捷排除龙虎状态
			     */
			    fastExcludeDragonTiger(selectFastTab=[]) {
			      // if (selectFastTab.length <= 0) {
			      //   this.isShowFastDragonTiger = true;
			      //   return;
			      // }
			      // for (let item in selectFastTab) {
			      //   if (parseInt(selectFastTab[item]) < 5) {
			      //     this.isShowFastDragonTiger = true;
			      //     return;
			      //   }
			      // }
			      // $(".fast-lot-div-d").parents(".lot-select-col").removeClass("lot-select-col-active");
			      // this.isShowFastDragonTiger = false;
			    },
			flodLotRate(i) {
				this.commonSelectStoreArray(i,this.lotSelectNameFlod);
			},
			isSelectNameFlod(index){
				if(this.lotSelectNameFlod.indexOf(index)>-1){
					return true;
				}else{
					return false;
				}
			},
			commonSelectStoreArray(index,obj){
				let idx = obj.indexOf(index);
				//如果已经选中了，那就取消选中，如果没有，则选中
				if (idx > -1) {
					obj.splice(idx, 1);
				} else {
					obj.push(index);
				}
			},
			/**
			 * @param {Object} item 对象数据
			 * @param {Object} key 对象的关键key
			 * @param {Object} value 对的关键key的值
			 * @param {Object} obj  对象的数组
			 */
			commonSelectStoreItem(item,key,value,obj){
				let idx=Tools.getObjKeyIndex(obj,key,value);
				if (idx > -1) {
					Tools.deleteObjByKey(obj,key,value);
				} else {
					obj.push(item);
				}
			},
			/**
			 * 特殊的六合彩合肖和自选不中，福彩3d组选的逻辑,江苏快三红码和黑码组合
			 * @param itemId 
			 * @param type 
			 * @param balls  有最大值和最小值 
			 */
			selectSpecialLotCol(itemId, type, lottype="",row){
				// if(this.disableBet){
				// 	VueTools.toastNo("已经处于封盘中");
				// 	return;
				// }
				let minAndMax = [];//获取最新和最大选择值
				    let zxItemID = "";
				    if (!Tools.isEmpty(this.f3dzx3_zx6 + "")) {
				      let temp = this.f3dzx3_zx6;
				      minAndMax = (temp.list[0].balls).match(/(\d{1,3})+(?:\.\d+)?/g);
				      zxItemID = temp.list[0].item_id;
				    }
				    if (!Tools.isEmpty(this.specialZmlmTypeLotColItem + "")) {
				      let temp = this.specialZmlmTypeLotColItem;
				      minAndMax = temp.balls.match(/(\d{1,3})+(?:\.\d+)?/g);
				      zxItemID = temp.item_id;
				    }
					let idx=Tools.getObjKeyIndex(this.selectLotItemID,"id",itemId);
				    if(idx>-1){
				      this.selectLotItemID.splice(idx,1);
				      this.selectLotNumber--;
				    } else {
				      if (type != 'f3d_zs3') {//非福彩3d的组选
				        if (this.selectLotNumber >= 11) {
				          VueTools.toastNo("已经超出可选最大项目个数");
				          return;
				        }
				      } else {
				        if (this.selectLotNumber >= parseInt(minAndMax[1])) {
				          VueTools.toastNo("已经超出可选最大项目个数");
				          return;
				        }
				      }
					  this.selectLotItemID.push(row);
				      this.selectLotNumber++;
				    }
					console.log("selectSpecialLotCol选择赔率的数组数据:",this.selectLotItemID);
					//////////////////////////////////////
				    if (type == 'sxd') { //合肖
				      if (this.selectLotNumber >= 2) {
				        this.fastShowState = true;
				        this.deailPresetVal();
				        this.getSpecialRate(lottype == 'lhc' ? Config.LHC_SXD_ITEMID : Config.QLC_SXD_ITEMID);
				      } else {
				        this.fastShowState = false;
				        this.specialRateVal = 0;
				      }
				    } else if (type == 'slx') {//自选不中
				      if (this.selectLotNumber >= 5) {
				        this.fastShowState = true;
				        this.deailPresetVal();
				        this.getSpecialRate(lottype == 'lhc' ? Config.LHC_SLX_ITEMID : Config.QLC_SLX_ITEMID);
				      } else {
				        this.fastShowState = false;
				        this.specialRateVal = 0;
				      }
				    } else if (type == 'f3d_zs3' || type == 's3s_zs3_zs6' || type == 'ss8_zs3') {
				      if (this.selectLotNumber >= parseInt(minAndMax[0])) {
				        this.fastShowState = true;
				        this.deailPresetVal();
				        this.getSpecialRate(zxItemID);
				      } else {
				        this.fastShowState = false;
				        this.specialRateVal = 0;
				      }
				    }
				    //计算投资总投资额
				    this.calculateTotalBetMoney();
			},
			/**
			 * 选中赔率
			 * @param {Object} itemId
			 * @param {Object} row
			 */
			selectLotCol(itemId,row){
				// if (this.disableBet) {
				//       VueTools.toastNo("已经处于封盘中");
				//       return;
				//     }
					let idx=Tools.getObjKeyIndex(this.selectLotItemID,"id",itemId);
					if(idx>-1){
					  this.selectLotItemID.splice(idx,1);
					  this.selectLotNumber--;
					}else{
						this.selectLotItemID.push(row);
						this.selectLotNumber++;
					}
					console.log("selectLotCol选择赔率的数组数据:",this.selectLotItemID);
				    if (this.selectLotNumber > 0 ) {
				      this.fastShowState = true;
				      this.deailPresetVal();
				    } else {
				      this.fastShowState = false;
				    }
				    //计算投资总投资额
				    this.calculateTotalBetMoney();
			},
			/**
			 * 计算投资总投资额
			 */
			calculateTotalBetMoney(){
				
			},
			/**
			 * 重置数据
			 */
			resetVal(){
				this.selectLotItemID.length=0;
				this.selectLotNumber=0;
				this.selectLotNumberArr.length=0;
				this.fastShowState=false;
				this.specialRateVal=0;
				this.specialData.length=0;
				this.selectZmlmArr.length=0;
				this.selectZmlmNum=1;

				this.mixRateSelect.length=0;
				this.mixBetArr.length=0; //快捷下选中赔率最终拼合的数据
				this.showLotBarIndex.length=0;//快捷选中上面的tabbar的数组

				//福彩3d,体彩p3的二字定位和三字定位
				this.f_p_3d_oneArr.length=0;
				this.f_p_3d_twoArr.length=0;
				this.f_p_3d_threeArr.length=0;

			},
			/**
			 * 快捷投注界面的取消按钮的事件
			 */
			onReset(){
				this.resetVal();
			},
			/**
			 * 预设金额的值的恢复
			 */
			deailPresetVal(){
				
			},
			/**
			 * 获取特殊的赔率的值
			 * @param {Object} itemid
			 */
			getSpecialRate(itemid) {
			    let that = this;
			    this.selectLotNumberArr = this.selectLotItemID;
			    let balls = "";
				for(let i=0;i<this.selectLotItemID.length;i++){
					 balls += this.selectLotItemID[i].id + ",";
				}
				balls = balls.substring(0, balls.length - 1);
				Net.ayiHttp(
				 	URL.LOTTERY_COMBRATE,
				 	'{"itemid":"' + itemid + '","lotcode":"' + this.playCode + '","balls":"' + balls + '","region":"' + this.playABCD + '"}',
				 	function(res) {
				 		if (res.code == Config.SUCCESS_CODE) {
				 						//成功的逻辑
				 			let data = Tools.aesDecodeToJson(res.data);
				 			that.specialRateVal = data.rate;
				 		} else {
				 			that.specialRateVal = 0;
				 		} 
				 	},
				 	function(err) {
				 		that.specialRateVal = 0;
				 	}
				);

			  },
			  /**
			   * 针对的是模板class是否选择了赔率的元素
			   * @param {Object} itemId
			   */
			  isSelectLotRate(itemId){
				 return Tools.isExitObjKey(this.selectLotItemID,"id",itemId);
			  },
			  /**
			     * 连码选中类别
			     * @param item 当前类别的对象
			     * @param mark 下标
			     */
			    selectSpecialZmlmTypeLotCol(item, mark) {
			      if (this.specialZmlmTypeLotColLock != mark) {
					  
					this.resetVal();				 
					this.selectZmlmNum=1;
					this.selectZmlmArr.length=0;
					this.specialData.length=0;
					
			        this.specialZmlmTypeLotColLock = mark;
			        this.specialZmlmTypeLotColItem = item;
			        this.fastShowState = false;
			      }
			    },
				 /**
				   * 连码选中赔率
				   * @param itemId 赔率的id
				   * @param markStr 一个字符串的标记  
				   */
				  selectSpecialZmlmLotCol(itemId, markStr="") {
				    // if (this.disableBet) {
				    //   VueTools.toastNo("已经处于封盘中");
				    //   return;
				    // }
				    let tempBalls = (this.specialZmlmTypeLotColItem.balls).match(/(\d{1,3})+(?:\.\d+)?/g);
				    let tid = this.specialZmlmTypeLotColItem.item_id;
					
					let idx = this.selectZmlmArr.indexOf(itemId);
				    if (idx > -1) {
				      this.selectZmlmArr.splice(idx, 1);
				      this.selectZmlmNum--;
				    } else {
				      if (markStr == 'zmlm') {//六合的连码固定只选择7个
				        if (this.selectZmlmNum > 7) {
				          VueTools.toastNo("已经超出可选最大项目个数");
				          return;
				        }
				      } else {
				        if (this.selectZmlmNum > parseInt(tempBalls[1])) {
				          VueTools.toastNo("已经超出可选最大项目个数");
				          return;
				        }
				      }
				      this.selectZmlmArr.push(itemId);
				      this.selectZmlmNum++;
				    }
				    //todo  选中个数和投资的逻辑处理
				    if (this.selectZmlmNum - 1 >= tempBalls[0]) {//弹出底部的投资栏
				      this.fastShowState = true;
				      this.deailPresetVal();
				      let tempRes = [];
				      for (let item in this.selectZmlmArr) {
				        tempRes.push(this.selectZmlmArr[item]);
				      }
				      let tempBetData = [];
				      if (tempRes.length == tempBalls[0]) {
				        tempBetData.push({ "id": tid, "balls": tempRes.join(',') });
				      } else {
				        let combineArr = Tools.arrayCombine(tempRes, false, tempBalls[0]);
				        for (let item in combineArr) {
				          tempBetData.push({ "id": tid, "balls": combineArr[item] });
				        }
				      }
				      this.selectLotNumber = tempBetData.length; //投注的注数
				      this.calculateTotalBetMoney();//统计投资总额
				      this.specialData = tempBetData;
				      console.log("组合:", tempBetData);
				    } else {//关闭投注栏
				      this.fastShowState = false;
				    }
				  },
				  /**
				     * 福彩3d,体彩3d的二字和三字的处理
				     * @param itemId 
					 * @param playCode 玩法的code
					 * @param section 第几块
					 * @param row 选择的那一列
				     */
				    selectF3dLotCol(itemId, playCode,section,row) {
						if(section==0 || section=='0'){
							this.commonSelectStoreItem(row,"id",itemId,this.f_p_3d_oneArr);
						}else if(section==1 || section=='1'){
							this.commonSelectStoreItem(row,"id",itemId,this.f_p_3d_twoArr);
						}else if(section==2 || section=='2'){
							this.commonSelectStoreItem(row,"id",itemId,this.f_p_3d_threeArr);
						}
				      let idx0 = this.f_p_3d_oneArr.length;
				      let idx1 = this.f_p_3d_twoArr.length;
				      let res = [];//处理后存放的数组
				      if (playCode == 'f3d_3dw' || playCode == 'pl3_3dw') {//三字
				        let idx2 =  this.f_p_3d_threeArr.length;
				        if (idx0 > 0 && idx1 > 0 && idx2 > 0) {
				          this.fastShowState = true;
				          this.deailPresetVal();
				          let arr0 = this.getSelectF3dSelectSectionArr(this.f_p_3d_oneArr);
				          let arr1 = this.getSelectF3dSelectSectionArr(this.f_p_3d_twoArr);
				          let arr2 = this.getSelectF3dSelectSectionArr(this.f_p_3d_threeArr);
				          res = Tools.doExchange([arr0, arr1, arr2]);
				        } else {
				          this.fastShowState = false;
				        }
				      } else if (playCode == 'f3d_2dw' || playCode == 'pl3_2dw') {//二字
				        if (idx0 > 0 && idx1 > 0) {
				          this.fastShowState = true;
				          this.deailPresetVal();
				          let arr0 = this.getSelectF3dSelectSectionArr(this.f_p_3d_oneArr);
				          let arr1 = this.getSelectF3dSelectSectionArr(this.f_p_3d_twoArr);
				          res = Tools.doExchange([arr0, arr1]);
				        } else {
				          this.fastShowState = false;
				        }
				      }
				      this.selectLotNumber = res.length; //投注的注数
				      this.calculateTotalBetMoney();//统计投资总额
				      this.specialData = res;
					  console.log("福彩体彩的二字定位和三字定位的组合结果",res);
				    },
					/**
					 * 福彩3d,体彩3d的二字和三字的获取选中的数据的数组
					 * @param {Object} arrData  选中的存储的数据
					 */
					getSelectF3dSelectSectionArr(arrData) {
					    let arr = [];
					    let obj = arrData;
					    for (let i = 0; i < obj.length; i++) {
					      let temp = arrData[i];
						  arr.push(temp.name);
					    }
					    return arr;
					  },
					  /**
					   * 正对福彩3d,体彩p3的选中赔率正对模板
					   * @param  itemId  
					   * @param  section 第几部分
					   */
					  isSelectF3DLotRate(itemId,section){
						  if(section==0 || section=='0'){
						  	return Tools.isExitObjKey(this.f_p_3d_oneArr,"id",itemId);
						  }else if(section==1 || section=='1'){
						  	return Tools.isExitObjKey(this.f_p_3d_twoArr,"id",itemId);
						  }else if(section==2 || section=='2'){
						  	return Tools.isExitObjKey(this.f_p_3d_threeArr,"id",itemId);
						  }
					  },
				/**
				 * 快捷投资界面上面的确定事件
				 */	  
				onFastSubmit(){
					if (this.betInputVal <= 0) {
					      VueTools.toastNo("请输入投注额");
					      return;
					    }
					    //投注数据
					    if (this.playCode == 'qlc_zmlm' || this.playCode == 'lhc_zmlm' || this.playCode == 'ssg_rx' || this.playCode == 'az8_rx' || this.playCode == 'stj_rx' || this.playCode == 'qlc_ddb' || this.playCode == 'lhc_ddb' || this.playCode == 'stj_rx') { //连码,六合彩的连肖连尾的特殊投注 
					      this.onBet('zmlm', this.specialData);
					    } else if (this.playCode == 'lhc_sxd' || this.playCode == 'qlc_sxd' || this.playCode == 'lhc_slx' || this.playCode == 'qlc_slx') { //六合彩合肖和自选不中的投注
					      this.onBet("slx_sxd");
					    } else if (this.playCode == 'f3d_2dw' || this.playCode == 'f3d_3dw' || this.playCode == 'pl3_2dw' || this.playCode == 'pl3_3dw') {//福彩3d,体彩3d的二字和三字
					      this.onBet('f3d_dw', this.specialData);
					    } else if (this.playCode == 'f3d_zs3' || this.playCode == 'f3d_zs6' || this.playCode == 'pl3_zs3' || this.playCode == 'pl3_zs6') {//福彩3d的组选,
					      this.onBet('f3d_zs');
					    } else if (this.playCode == 'ss8_zs3') {//ss8_zs3极速时时彩组选三
					      this.onBet('ss8_zs3');
					    } else {
					      this.onBet();
					    }
					    this.setPresetVal();
				},
				/**
				  * 下注
				*/
				onBet(specialName="", specialData="") {
				    // if (this.disableBet) {
				    //   VueTools.toastNo("已经处于封盘中");
				    //   return;
				    // }
				    if (this.selectLotNumber == 0) {
				      VueTools.toastNo("请选择投注项目");
				      return;
				    }
					
				    if (!Tools.isEmpty(specialName)  && specialName == 'zmlm') {//特殊的投注方式
				      this.betNet(specialData);
				      this.onCloseMask();
				      return;
				    } else if (!Tools.isEmpty(specialName)  && specialName == 'f3d_dw') {
				      let res = [];
				      for (let item in specialData) {
				        let key = parseInt(specialData[item].join(''));
				        let temp = (this.f3dLotData[0].list)[key];
				        let itemId = temp.item_id;
				        res.push({ "id": itemId, "balls": specialData[item].join(',') });
				      }
				      this.betNet(res);
				      this.onCloseMask();
				      return;
				    }
				    if ((this.code == 'pks' || this.code == 'sg8' || this.code == 'pt8' || this.code == 'pk8' || this.code == 'pkt' || this.code == 'sjs' || this.code == 'ss8' ||
				      this.code == 'ssn' || this.code == 'xyssc' || this.code == 'ssc' || this.code == 'ssg' || this.code == 'az8' || this.code == 'sgx') && this.playCode == 'fast') {//快捷的快速投注  
				      this.betMixBet(this.mixBetArr);
				      //将数据给重置
				      this.onCloseMask();
				    } else {//非快捷的投注方式
				      let that = this;
				      this.selectLotNumberArr = this.selectLotItemID;
				        if (specialName == 'slx_sxd') {//六合彩中的合肖和自选不中
				          let tempBalls = [];
				          for (let item in this.selectLotNumberArr) {
				            tempBalls.push(this.selectLotNumberArr[item]['id']);
				          }
				          let item_id = this.playCode == 'lhc_sxd' ? Config.LHC_SXD_ITEMID : (this.playCode == 'qlc_sxd' ? Config.QLC_SXD_ITEMID : (this.playCode == 'lhc_slx' ? Config.LHC_SLX_ITEMID : Config.QLC_SLX_ITEMID));
				          this.betNet([{ "id": item_id, "balls": tempBalls.join(','), "rate": this.specialRateVal }]);
				          return;
				        } else if (specialName == 'f3d_zs') {
				          let tempBalls = [];
				          for (let item in this.selectLotNumberArr) {
				            tempBalls.push(this.selectLotNumberArr[item]['id']);
				          }
				          if (!Tools.isEmpty(this.f3dzx3_zx6 + "")) {
				            let temp = this.f3dzx3_zx6;
				            this.betNet([{ "id": temp.list[0].item_id, "balls": tempBalls.join(','), "rate": this.specialRateVal }]);
				          }
				          return;
				        } else if (specialName == 'ss8_zs3') {
				          let tempBalls = [];
				          for (let item in this.selectLotNumberArr) {
				            tempBalls.push(this.selectLotNumberArr[item]['id']);
				          }
				          if (!Tools.isEmpty(this.specialZmlmTypeLotColItem + "")) {
				            let temp = this.specialZmlmTypeLotColItem;
				            this.betNet([{ "id": temp.item_id, "balls": tempBalls.join(','), "rate": this.specialRateVal }]);
				          }
				          return;
				        } else {
				          this.betNet(this.selectLotNumberArr);
				        }
				        //将数据给重置
				        this.onCloseMask();
				    }
				
				  },
				   /**
				     * 将数据进行投注操作
				     */
				     betNet(data) {
				      let that = this;
				      let num = this.betInputVal;
				      for (let i = 0; i < data.length; i++) {
				        data[i]['cash'] = num;
				      }
				      let obj = "{\"lotcode\":\"" + that.playCode + "\",\"rows\":" + JSON.stringify(data) + "}";
				      console.log("下注的参数:", obj);
					  // todo 添加一个进度条   提示信息为:提交中...,
					
					  Net.ayiHttp(
					  	URL.LOTTERY_CREATEORDER,
					  	'{"lotcode":"' + that.playCode + '","rows":' + JSON.stringify(data) + '}',
					  	function(res) {
					  		if (res.code == Config.SUCCESS_CODE) {
					  			//成功的逻辑
					  			let data = Tools.aesDecodeToJson(res.data);
								that.isMarkWin=true;//将模板显示出来
								that.getMoney();//更新余额
								that.betSuccessObj = data;
					  			console.log('非快捷的投资成功返回的数据', data);
					  		} else if (res.code == Config.FAIL_CODE) {
					  			VueTools.toastNo(res.message);
					  		} else if (res.code == Config.LOGIN_CODE) {
					  			uni.navigateTo({
					  				url: "/pages/my/login/login"
					  			});
					  		}else if (res.code == Config.BET_CHANGE_RATE) {
								VueTools.toastNo(data.message);
							} else {
								VueTools.toastNo(data.message);
							}
					  	},
					  	function(err) {
					  		console.log('error:', err);
					  	},{"tross":"createorder"}
					  );
					  
				    },
					/**
					   * 快捷的混合投注操作
					   */
					  betMixBet(data) {
					    let that = this;
					    let num = this.betInputVal;
					    for (let i = 0; i < data.length; i++) {
					      data[i]['cash'] = num;
					    }
					    let obj = "{\"rows\":" + JSON.stringify(data) + "}";
					    console.log("混合快捷投注的参数:", obj);
					    return;
					    this.http.get(UrlService.LOTTERY_FASTORDER, { "callback": "JSONP_CALLBACK", "data": ToolService.aesEncode(obj) }).subscribe(res => {
					      let data = res.json();
					      ToolService.setEncrypt(data.encrypt);
					      loading.dismiss();
					      if (data.code == ConfigService.SUCCESS_CODE) {
					        //成功的逻辑
					        let tempData = ToolService.aesDecodeToJson(data.data);
					        that.showBetWin();
					        that.betSuccessObj = tempData;
					        that.getMoney();
					        // console.log("成功后的输出结果:", tempData);
					      } else if (data.code == ConfigService.FAIL_CODE) {
					        that.popWin.toast(data.message);
					      } else if (data.code == ConfigService.LOGIN_CODE) {
					        that.navCtrl.navigateForward("/login");
					      } else if (data.code == ConfigService.BET_CHANGE_RATE) {
					        that.popWin.toast(data.message);
					      } else {
					        that.popWin.toast(data.message);
					      }
					    }, error => {
					      console.log("error", error);
					      loading.dismiss();
					    });
					  },
					  /**
					   * 更新剩下的余额
					   */
					  getMoney() {
					      let that = this;
					      // this.http.get(UrlService.USER_FINDCREDIT, { "callback": "JSONP_CALLBACK" }).subscribe(res => {
					      //   let data = res.json();
					      //   ToolService.setEncrypt(data.encrypt);
					      //   if (data.code == ConfigService.SUCCESS_CODE) {
					      //     let res = ToolService.aesDecodeToJson(data.data);
					      //     that.moneyObj = res;
					      //     console.log("--金额===", res);
					      //     that.store.set(ConfigService.MONEY_KEY, res);
					      //   } else if (data.code == ConfigService.FAIL_CODE) {
					      //     that.popWin.toast(data.message);
					      //   } else if (data.code == ConfigService.LOGIN_CODE) {
					      //     that.navCtrl.navigateForward("/login");
					      //   }
					      // }, error => {
					      //   console.log("error", error);
					      // });
					    },
					 /**
					   * 关闭蒙版的窗口
					   */
					  onCloseMask() {
					    this.isMarkWin = false;
					    this.resetVal();//数据清除
					  },
				/**
				   * 设置投资的金额的数据(勾选预设的按钮)
				   */
				  setPresetVal() {
				    // let checkV = $('input[name="fast-checkbox"]:checked').val();
				    // if (Tools.isEmpty(checkV)) {//取消预设
				    //   this.store.set("preset", { "preset": "0", "value": "" });
				    //   this.betInputVal=0;
				    //   this.betMoney="";
				    //   $("#fast-bet-input-text").val("");
				    // } else {//预设
				    //   this.store.set("preset", { "preset": "1", "value": this.betInputVal });
				    // }
				  },
				  /**
				   * 模板是用的过滤器方法
				   */
				  lotnumFilter(value){
					  return parseInt(value) % 10;
				  },
				  notEmptyFilter(value) {
				  	return !Tools.isEmpty(value);
				  },
				  isNumberFilter(value) {
						return Tools.isPositiveNum(value);
				  },
				  sscInt(value){
						return "/static/img/sx_"+parseInt(value)+".png";
				  }
			
			
		}
	};
</script>

<style lang="scss">
	@import 'lotdetail.scss';
</style>